package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.UserPushConf;
import com.sc.nft.mapper.UserPushConfMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * @author 刘国航
 * @desc
 * @since 2024/6/14 10:58
 */
@Slf4j
@Repository
public class UserPushConfDao extends ServiceImpl<UserPushConfMapper, UserPushConf> {

    public UserPushConf getByUserId(Long userId) {
        LambdaQueryWrapper<UserPushConf> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(UserPushConf::getUserId, userId);
        return baseMapper.selectOne(queryWrapper);
    }

}
